package com.Lyy.service;

import com.Lyy.dao.StudentDaoI;
import com.Lyy.enity.Student;
import lombok.Data;

@Data
public class StudentSE implements StudentSEI {
    private StudentDaoI studentDaoI;

    public Student getStudentById(int id){
        Student student = studentDaoI.SelectStudentById(id);
        return student;
    }

    @Override
    public Boolean deleteById(int id) {
        int i = studentDaoI.deleteStudentById(id);
        return i>0;
    }

    @Override
    public Boolean addStudent(Student student) {
        int i = studentDaoI.addStudentById(student);
        return i>0;
    }

}
